﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MyOA.DAL;
using MyOA.Model;

namespace MyOA.BLL
{
    public class OperateLogManage
    {
        OperateLogService service = new OperateLogService();

        /// <summary>
        /// 根据登陆时间来获取操作信息
        /// </summary>
        /// <param name="startTime">登陆时间</param>
        /// <param name="endTime">登陆时间</param>
        /// <param name="size">一页显示多少条数据</param>
        /// <param name="currentPage">当前是第几页</param>
        /// <param name="isCount">是否要进行计算总行数的操作0是进行，因为这个操作只进行一次</param>
        /// <param name="sum">out所有操作信息的总数</param>
        /// <returns>返回符合条件的操作信息</returns>
        public IList<OperateLog> getOperateLogByOperateTime(DateTime startTime, DateTime endTime, int size, int currentPage, int isCount, out int sum)
        {
            return service.getOperateLogByOperateTime(startTime, endTime, size, currentPage, isCount, out sum);
        }

        /// <summary>
        /// 根据操作日志ID来删除操作日志
        /// </summary>
        /// <param name="operateId">操作日志ID</param>
        /// <returns>是否删除成功</returns>
        public bool deleteOperateLogByOperateId(int operateId)
        {
            return service.deleteOperateLogByOperateId(operateId);
        }

        /// <summary>
        /// 根据操作日志ID集合来删除操作日志
        /// </summary>
        /// <param name="operateIds">操作日志ID集合</param>
        /// <returns>是否删除成功</returns>
        public bool deleteOperateLogByOperateId(string operateIds)
        {
            return service.deleteOperateLogByOperateId(operateIds);
        }
    }
}
